%module skpng
%{
#define SWIG_FILE_WITH_INIT
#include "skpng.h"
%}

typedef struct skpng_image_info_str {
    unsigned int width, height ;
    Byte bit_depth, color_type ;
} skpng_image_info;

typedef struct skpng_image_str {
    skpng_image_info pngimageinfo;
    png_bytepp pngimage ;
} skpng_image ;

typedef struct skpng_image_color_layer_str {
    float R,G,B,A ;
} skpng_image_color_layer ;

skpng_image_color_layer skpng_formula_alphablending(skpng_image_color_layer*, skpng_image_color_layer*, float) ;
int skpng_proceed_merge(skpng_image*, skpng_image*, skpng_image*, float) ;
int skpng_proceed_extractdiff(skpng_image*, skpng_image*, skpng_image*, float, int) ;
int skpng_read(char*, skpng_image*) ;
int skpng_prepare_output_file(char*, skpng_image*) ;
int skpng_write(char*, skpng_image*) ;
void skpng_png_version_info(void) ;
